<layout name="layout"/>
<section class="content-header">
    <h1>
        角色管理
    </h1>
</section>

<div class="content">
    <div class="box box-info">
        <div class="box-header with-border">
            <h3 class="box-title">搜索</h3>
        </div>
        <form class="form-horizontal">
            <div class="box-body">
                <label for="" class="col-sm-2 control-label">所属应用</label>

                <div class="col-xs-2">
                    <select name="appid" id="appid" class="form-control">
                        <option
                        <empty name="Think.Get.appid"> selected="selected"</empty>
                        value="">请选择</option>
                        <volist name="apps" id="vo">
                            <option
                            <assign name="vid" value="$Think.Get.appid" />
                            <assign name="oid" value="$vo.id" />
                            <if condition="$vid eq $oid">selected="selected"</if>
                            value="{$vo.id}">{$vo.name}</option>
                        </volist>

                    </select>
                </div>

                <label for="name" class="col-sm-2 control-label">角色名称</label>

                <div class="col-xs-3">
                    <input value="{$Think.Get.name}" class="form-control" id="name" name="name">
                </div>
            </div>
            <div class="box-footer">
                <a href="__APP__/home/role/add"  class="btn btn-info pull-right" style="margin-left: 5px">新增</a>
                <button type="submit" class="btn btn-success pull-right">搜索</button>
            </div>
            <!-- /.box-footer -->
        </form>
    </div>
    <div class="box">
        <!-- /.box-header -->
        <div class="box-body table-responsive no-padding">
            <table class="table table-hover">
                <tbody>
                <tr>
                    <th style="width: 10%;">所属应用</th>
                    <th style="width: 10%">角色名称</th>
                    <th>备注</th>
                    <th style="width: 30%">操作</th>
                </tr>
                <volist name="list" id="vo">
                    <tr>
                        <td>{$vo.appname}</td>
                        <td>{$vo.name}</td>
                        <td>{$vo.note}</td>
                        <td>
                            <a href="__APP__/home/role/configMenu?id={$vo.id}" class="btn btn-primary ">菜单权限</a>
                            <a href="__APP__/home/role/configUser?id={$vo.id}" class="btn btn-success ">设置用户</a>
                            <a href="__APP__/home/role/edit?id={$vo.id}" class="btn btn-info ">编辑</a>
                            <a href="javascript:void(0)"
                               onclick="deleteEntity('__APP__/home/role/deleteEntity','{$vo.id}')"
                               class="btn btn-danger ">删除</a>
                        </td>
                    </tr>
                </volist>
                </tbody>
            </table>
        </div>
        <!-- /.box-body -->
    </div>
    <div class="result page">{$page}</div>
</div>

